import progetto.bean.Registration;
import progetto.dto.UserDTO;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;


/**
 * Created by fede on 20/12/13.
 */

@ManagedBean(name = "registration")
@RequestScoped

public class RegistrationManagedBean {

    @EJB
    private Registration registration;

    private UserDTO userDTO;

    public RegistrationManagedBean() {
        userDTO = new UserDTO();
    }

    //Getters and setters

    public UserDTO getUserDTO() {
        return userDTO;
    }

    public void setUserDTO(UserDTO userDTO) {
        this.userDTO = userDTO;
    }

    public void storeData() {
        registration.storeData(userDTO);
    }
}
